<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="font-awesome.min.css?01_35" />
		<!--公共js-->
		<script type="text/javascript" src="jquery.js?01_35"></script>
		<!--插件-->
		<script type="text/javascript" src="jquery-validate.js?01_35"></script>
		<body>
			<div id="app">
				<input type="tel" name="" id="" placeholder="请输入账号" class="required" data-valid="isNonEmpty" data-error="账号输入有误" />
			    <!--错误提示-->
			<div class="error-box" style="height:10px;" id="errortip">
				<span class="mag-r-5 "></span>
			</div>
			<div onclick="sun_fun()">提交</div>
			</div>
			<script>
				//表单验证
				$('#app').validate({
					selectID: "#errortip" //指定弹出位置
				});
				function sun_fun(){
					$("#app").validate('submitValidate')  //该值将验证所有的条件是否都是成立的
					alert("点击了提交按钮")
				}
			</script>
		</body>

</html>